home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / GameKit / Apps / encryptHSpassword.c next >
Text File  |  1995-06-12  |  657b  |  22 lines

  1. //
  2. // encryptHSpassword.c -- use this to encrypt a password to put into a
  3. //        GameInfo object.  Just replace the #define to the desired
  4. //        password, recompile, and run.  Someday I'll put a real interface
  5. //        on this; at least it works.
  6.  
  7. #import <objc/Object.h>
  8. #import <daymisckit/DAYString.h>
  9.  
  10. #define GK_HS_PASSWORD "NONE"
  11.  
  12. void main()
  13. {
  14.     id aString = [[DAYString alloc] initString:GK_HS_PASSWORD];
  15.     id encr = [aString encrypt:[[DAYString alloc] initString:"GK"]]; // "GK" is the salt
  16.     printf("Encrypted string is:  \"%s\"\n", [encr stringValue]);
  17.     exit(0);
  18. }
  19.  
  20. // compile with:
  21. //  cc -ObjC encryptHSpassword.c -ldaymisckit -lNeXT_s -o encryptHSpassword
  22.